import {getGoods} from 'http'
export default {
    state:{
        goods:{}
    },
    mutations:{
        //goods 是mutations的载荷
        getGoods(state,goods){
            state.goods =goods
        }
    },
    actions:{
        //options是 action 的载荷
        async getGoods({commit},options){
          const {code,data} = await getGoods(options);
          if(code ===200){
              commit("getGoods",data)
          }
        }

    }

}
